package movie.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import movie.entity.Order;
import movie.entity.OrderSeat;
import movie.mapper.OrderMapper;
import movie.mapper.SeatMapper;
import movie.service.OrderService;
@Service
public class OrderServiceIpml implements OrderService {
	@Autowired
	private OrderMapper orderMapper;
	@Autowired
	private SeatMapper seatMapper;
	@Override
	public int insertOrder(Order order) {
		// TODO Auto-generated method stub
		return orderMapper.insertOrder(order);
	}
	
	
	@Override
	public List<Order> findOrder(int uid){
		return orderMapper.findOrderById(uid);
	}
	
	@Override
	public List findSeat(String oid) {
		return orderMapper.findSeatByoid(oid);
	}
	
	@Override
	public String findCover(int mid) {
		return orderMapper.findCoverById(mid);
	}
	@Override
	public int insertOrderSeat(OrderSeat orderSeat) {
		// TODO Auto-generated method stub
		return seatMapper.insertOrderSeat(orderSeat);
	}
}
